<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        padding: 0;
        margin: 0;
      }
      .circle_process {
        position: relative;
        width: 47px;
        height: 48px;
        /* background:pink; */
        border-radius: 50%;
      }
      .circle_process .wrapper {
        width: 24px;
        height: 48px;
        position: absolute;
        top: 0;
        overflow: hidden;
      }
      .circle_process .rightcircle {
        border-top: 1px solid #1390eb;
        border-right: 1px solid #1390eb;
        right: 0px;
        -webkit-animation: circle_right 5s linear infinite;
      }
      .circle_process .circle {
        width: 48px;
        height: 48px;
        border: 1px solid transparent;
        border-radius: 50%;
        position: absolute;
        top: 0;
        transform: rotate(-135deg);
      }
    </style>
  </head>
  <body>
    <div class="circle_process">
      <div class="wrapper right">
        <div class="circle rightcircle"></div>
      </div>
    </div>
    <script>
      function add() {
        const args = Array.prototype.slice.call(arguments);
        let inner = function () {
          args.push(...arguments);
          return inner;
        };
        inner.toString = function () {
          const sum = args.reduce((pre, cur) => {
            return pre + cur;
          }, 0);
          return sum;
        };

        return inner;
      }
      //   function add(...args) {
      //     let allArgs = [...args];
      //     function fn(...newArgs) {
      //       allArgs = [...allArgs, ...newArgs];
      //       return fn;
      //     }
      //     fn.toString = function () {
      //       if (!allArgs.length) {
      //         return;
      //       }
      //       return allArgs.reduce((sum, cur) => sum + cur);
      //     };
      //     return fn;
      //   }

      let a = add(1)(2)(3);
      console.log(a);
    </script>
  </body>
</html>
